//
//  UserCell.m
//  JsonDemo
//
//  Created by DuHaiFeng on 13-7-22.
//  Copyright (c) 2013年 dhf. All rights reserved.
//

#import "LS_AlbumCell.h"

@implementation LS_AlbumCell
{
    NSMutableDictionary *dic;
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        //self.contentView
        numberOfAll = 0;

    }
    return self;
}

- (IBAction)add:(UIButton *)sender {
//    [[NSNotificationCenter defaultCenter]postNotificationName:@"addmenber" object:nil];
    dic = [NSMutableDictionary dictionaryWithCapacity:10];
    [dic setObject:@"icon.png" forKey:@"value1"];
    [dic setObject:@"icon.png" forKey:@"value2"];
    [dic setObject:@"icon.png" forKey:@"value3"];
    [dic setObject:@"icon.png" forKey:@"value4"];
    [dic setObject:@"icon.png" forKey:@"value5"];
    [dic setObject:@"icon.png" forKey:@"value6"];
    [dic setObject:@"icon.png" forKey:@"value7"];
    [dic setObject:@"icon.png" forKey:@"value8"];
    [dic setObject:@"icon.png" forKey:@"value9"];
    
    
    UIButton * btn = [UIButton buttonWithType:UIButtonTypeCustom];
    btn.backgroundColor = [UIColor redColor];
    
    for (int i = 0; i<10 ; i++)
    {
        UIButton * btn = [UIButton buttonWithType:UIButtonTypeCustom];
        btn.backgroundColor = [UIColor redColor];
        btn.frame = CGRectMake(i*79+10, 10, 64, 64);
//        numberOfAll ++;
        [self addSubview:btn];

    }
    
    
//    if (btn.frame.origin.x < 247)
//    {
//        btn.frame = CGRectMake(numberOfAll*79+10, 10, 64, 64);
//    }
//    else
//    {
//        btn.frame = CGRectMake(numberOfAll*79+10, 10, 64, 64);
//    }
//    [self addSubview:btn];
//    NSLog(@"%f",btn.frame.origin.x);
}

- (IBAction)del:(UIButton *)sender {
    [[NSNotificationCenter defaultCenter]postNotificationName:@"delmenber" object:nil];
}

- (void)dealloc {
    [_coverImageView release];
    [_bgview release];
    [_albumCountLabel release];
    [_usercrc release];
    [super dealloc];
}
@end
